package com.neuedu.demo3;

import java.util.Scanner;

public class Homework01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入利润");
        double money = sc.nextDouble();
        double sal;

        //计算每一个级别的工资数


        double money1 = 100000 * 0.10;

        double money2 = 100000 * 0.10 + 100000 * 0.075;

        double money3 = 100000 * 0.10 + 100000 * 0.075 + 200000 * 0.05;

        double money4 = 100000 * 0.10 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03;

        double money5 = 100000 * 0.10 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + 400000 * 0.015;

        if (money <= 100000) {

            sal = money * 0.10;//10w以内

            System.out.println(sal);

        } else if (money > 100000 && money <= 200000) {

            sal = money1 + (money - 100000) * 0.075;//10w以上20w以内

            System.out.println(sal);

        } else if (money > 200000 && money <= 400000) {

            sal = money2 + (money - 200000) * 0.05;//20w以上40w以内.

            System.out.println(sal);

        } else if (money > 400000 && money <= 600000) {

            sal = money3 + (money - 400000) * 0.03;//40w以上60w以内

            System.out.println(sal);

        } else if (money > 600000 && money < 1000000) {

            sal = money4 + (money - 600000) * 0.015;//60w以上100w以内

            System.out.println(sal);
        } else {
            sal = money5 + (money - 1000000) * 0.01;//100w以上
            System.out.println(sal);
        }
    }
}
